<!DOCTYPE html>
<html>
<head>
	<!-- Google Tag Manager -->
	<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
	new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
	j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
	'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
	})(window,document,'script','dataLayer','GTM-W8KNPT4');</script>
	<!-- End Google Tag Manager -->
	<meta charset="utf-8">
    <meta name="viewport" content="width=device-width,inital-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no,minimal-ui">
    <meta name="apple-mobile-web-app-capable" content="yes">
	<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
	<meta name="format-detection" content="telephone=no">
    <title>博猫体育</title>
    <link rel="stylesheet" href="css/app.min.css?ver=1.0.000">
    <link rel="stylesheet" href="css/iconfont.css?ver=1.0.000">
    <script src="js/template7.min.js"></script>
    <script src="http://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js" type="text/javascript"></script>
    <script src="js/templateHelper.js"></script>
    <script src="js/order.min.js"></script>
    <script src="js/qrcode.min.js"></script>
    <script src="js/pageLib.js"></script>
    <script src="js/clipboard.min.js"></script>
</head>
<body>
<div class="header">
	<div class="nav">
		<div class="title">以太坊ETH充值</div>
		<a href="javascript:history.back(-1);" class="left-btn"><i class="iconfont icon-xitongfanhui icon-middle"></i></a>
		<!-- <div class="right-btn login-bar">登录 / 注册</div>
		<div class="right-btn user-info-bar" style="display:none;">
			<div class="login flexer">
				<div class="balance">
					<div>余额</div>
					<div>￥888.88</div>
				</div>
				<div class="deposit"><a href="deposit.html">充值</a></div>
			</div>
		</div> -->
	</div>
</div>
<div class="table-content ethereum-content" style="padding-top:45px;padding-bottom:120px;">
	
	<div class="ethereum-logo"><img src="images/ethereum-wallet.png"></div>

	<div class="transfer-tips">
		<center class="content">请向以下地址转账 <!-- <b class="eth-amount">0.00</b>ETH（折合￥<b class="rmb-amount">00.00</b>） --></center>
		<center>（转账后1~3分钟内到账）</center>
	</div>

	<div class="address"><input type="text" id="address-input" readonly="" value="正在加载地址..."> <a href="javascript:;" class="copy-btn" data-clipboard-target="#address-input" data-value="">复制</a></div>

	<div class="address-qrcode">
		<div id="qrcode" data-value="">加载中...</div>
	</div>

	<!-- <div class="question"><a href="#">怎么充值？</a></div> -->

	<div class="attention">
	<h4>怎么充值?</h4>
	<p><b>简介</b></p>
	<p>1)如果您已经持有以太币ETH: 向上面的地址转账相应数额即可完成充值</p>
	<p>2)如果您没有以太币ETH:<br> ①通过第三方交易平台购买以太币ETH<br> ② 向上面的地址转账完成充值</p>
	<p>我们推荐你到以下这些第三方交易平台购买以太币:</p>
	<p>
		<a href="https://changelly.com/" target="_blank" rel="nofollow" class="ex">Changelly</a>
		<a href="https://indacoin.com/" target="_blank" rel="nofollow" class="ex">Indacoin</a>
		<a href="https://www.bitstamp.net/" target="_blank" rel="nofollow" class="ex">Bitstamp</a>
		<a href="https://www.kraken.com" target="_blank" rel="nofollow" class="ex">Kraken</a>
		<a href="https://www.coinbase.com/" target="_blank" rel="nofollow" class="ex">Coinbase</a>
	</p>
	<p>(如果您在这些平台上遇到问题，请联系这些平台的客服)</p>
	<p><b>充值确认</b></p>
	<p>充值确认时间取决于当前区块链全网算例，ETH充值通常需要3分钟左右确认交易。如果你充值失败，或者遇到问题，请联系我们的微信客服，我们将进行人工处理，客服微信：<br>客服微信：keantim3 <a href="javascript:;" class="copy-btn" data-clipboard-text="keantim3">复制</a></p>
	<p><b>请注意</b></p>
	<p>· 该地址只接受ETH货币充值，禁止转入非ETH货币，任何非ETH货币转入将不可找回</p>
	<p>· 为了您的资金安全，充值、提现交易均需要等待区块链确认，充值得到1个确认后资金即可到达您的账户余额，而您若需要提现，则需要对应的充值交易得到6个区块确认。</p>
	<p>· 最小充值额：0.001ETH. 少于该金额的充值将会失败并且资金无法退回。</p>
	<p>· 你的充值地址可能会变动, 一旦发生变动我们会通过您留在我们平台上的联系方式及时通知您.</p>
	<p>· 为了您的资金安全，在处理任何资金操作时，请确保的您的电脑及浏览器处于安全的环境下。</p>

	</div>

</div>

</body>
<script type="text/javascript">
$(document).ready(function(){
	pageLib.initAffiliate();
	var amount=pageLib.getQueryArgs(window.location.href).amount;

	// 实例化复制按钮
	var clipboard=new ClipboardJS('.copy-btn');
	clipboard.on('success', function(e) {
		var target=$(e.trigger);
		target.text('已复制');
		setTimeout(function(){target.text('复制');},1000);
		e.clearSelection();
	});

	$.ajax({
		url: '/api/index.php/Api/getEtherFromRmb',
		type: 'post',
		data:{
			'amount': amount
		},
		dataType:'json',
		success: function(resp){
			var ether=resp.data.ether;
			$('.transfer-tips center.content').html('请向以下地址转账 <b class="eth-amount">'+ether+'</b>ETH（折合￥<b class="rmb-amount">'+amount+'</b>）');
		}
	});

	pageLib.loadUserInfo(function(resp){
		$.ajax({
			url: '/api/index.php/Api/getAddress',
			type: 'post',
			data:{
				'username': resp.data.mobile,
				'merchantid': 'betcat'
			},
			dataType:'json',
			success: function(resp){
				var address=resp.data.address;
				$('.address input').val(address).on('click',function(){
					$(this).focus().select();
					this.selectionStart = 0;
					this.selectionEnd = this.val().length;
				});
				$('.address').attr('data-value',address);
				$('.address-qrcode #qrcode').attr('data-value',address).text('');
				var qrcode = new QRCode(document.getElementById("qrcode"), {
					width : 150,
					height : 150
				});
				qrcode.makeCode(address);

				// $('.copy-btn').on('click',function(){
				// 	pageLib.copy($(this).data('value'));
				// });
			}
		});
	});
	
	
	

});
</script>
</html>